<form action="{$base_url}&action=comment_save" method="post" class="comment{if isset($comment)} edit{/if}">
	<input type="hidden" name="comment[id]" id="comment_id_{if isset($comment)}{$comment->id}{/if}" value="{if isset($comment)}{$comment->id}{/if}" />
	<input type="hidden" name="comment[answer_to]" id="comment_answer_to_{if isset($comment)}{$comment->id}{/if}" value="{if isset($comment)}{$comment->answer_to}{/if}" />
	<input type="hidden" name="comment[post_id]" id="comment_post_id_{if isset($comment)}{$comment->id}{/if}" value="{$post->id}" />
	<div class="row">
		<label for="comment_author_{if isset($comment)}{$comment->id}{/if}">Автор:</label>
		<select name="comment[author]" id="comment_author_{if isset($comment)}{$comment->id}{/if}">
			{foreach $users as $user}
				<option{if (isset($comment) && $comment->author && $user->id == $comment->author) || (App_Access::user()->id == $user->id)} selected="selected"{/if} value="{$user->id}">{$user->login}</option>
			{/foreach}
		</select>
	</div>
	<div class="row">
		<label for="comment_text_{if isset($comment)}{$comment->id}{/if}">Комментарий:</label>
		<textarea name="comment[text]" id="comment_text_{if isset($comment)}{$comment->id}{/if}" cols="30" rows="10">{if isset($comment)}{$comment->text}{/if}</textarea>
	</div>
	<div class="row">
		<label for="comment_date_createtime_{if isset($comment)}{$comment->id}{/if}">Дата создания</label>
		<input type="text" class="date" name="comment[date_createtime]" id="comment_date_createtime_{if isset($comment)}{$comment->id}{/if}" value="{if isset($comment)}{date('d.m.Y', $comment->date_createtime)}{else}{date('d.m.Y', time())}{/if}" />
	</div>
	<div class="buttons">
		<input type="submit" value="Сохранить" class="apply" />
		<input type="reset" value="Отменить" class="cancel" />
	</div>
</form>